Optimal. Leaf size=69 \[ \frac {b e^2 (c+d x)^2}{6 d}+\frac {e^2 (c+d x)^3 \left (a+b \tanh ^{-1}(c+d x)\right )}{3 d}+\frac {b e^2 \log \left (1-(c+d x)^2\right )}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {6242, 12, 6037,
272, 45} \begin {gather*} \frac {e^2 (c+d x)^3 \left (a+b \tanh ^{-1}(c+d x)\right )}{3 d}+\frac {b e^2 (c+d x)^2}{6 d}+\frac {b e^2 \log \left (1-(c+d x)^2\right )}{6 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 45
Rule 272
Rule 6037
Rule 6242
Rubi steps
\begin {align*} \int (c e+d e x)^2 \left (a+b \tanh ^{-1}(c+d x)\right ) \, dx &=\frac {\text {Subst}\left (\int e^2 x^2 \left (a+b \tanh ^{-1}(x)\right ) \, dx,x,c+d x\right )}{d}\\ &=\frac {e^2 \text {Subst}\left (\int x^2 \left (a+b \tanh ^{-1}(x)\right ) \, dx,x,c+d x\right )}{d}\\ &=\frac {e^2 (c+d x)^3 \left (a+b \tanh ^{-1}(c+d x)\right )}{3 d}-\frac {\left (b e^2\right ) \text {Subst}\left (\int \frac {x^3}{1-x^2} \, dx,x,c+d x\right )}{3 d}\\ &=\frac {e^2 (c+d x)^3 \left (a+b \tanh ^{-1}(c+d x)\right )}{3 d}-\frac {\left (b e^2\right ) \text {Subst}\left (\int \frac {x}{1-x} \, dx,x,(c+d x)^2\right )}{6 d}\\ &=\frac {e^2 (c+d x)^3 \left (a+b \tanh ^{-1}(c+d x)\right )}{3 d}-\frac {\left (b e^2\right ) \text {Subst}\left (\int \left (-1+\frac {1}{1-x}\right ) \, dx,x,(c+d x)^2\right )}{6 d}\\ &=\frac {b e^2 (c+d x)^2}{6 d}+\frac {e^2 (c+d x)^3 \left (a+b \tanh ^{-1}(c+d x)\right )}{3 d}+\frac {b e^2 \log \left (1-(c+d x)^2\right )}{6 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 59, normalized size = 0.86 \begin {gather*} \frac {e^2 \left ((c+d x)^2 (b+2 a (c+d x))+2 b (c+d x)^3 \tanh ^{-1}(c+d x)+b \log \left (1-(c+d x)^2\right )\right )}{6 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.56, size = 77, normalized size = 1.12
method | result | size |
derivativedivides | \(\frac {\frac {e^{2} \left (d x +c \right )^{3} a}{3}+\frac {b \,e^{2} \left (d x +c \right )^{3} \arctanh \left (d x +c \right )}{3}+\frac {e^{2} \left (d x +c \right )^{2} b}{6}+\frac {b \,e^{2} \ln \left (d x +c -1\right )}{6}+\frac {b \,e^{2} \ln \left (d x +c +1\right )}{6}}{d}\) | \(77\) |
default | \(\frac {\frac {e^{2} \left (d x +c \right )^{3} a}{3}+\frac {b \,e^{2} \left (d x +c \right )^{3} \arctanh \left (d x +c \right )}{3}+\frac {e^{2} \left (d x +c \right )^{2} b}{6}+\frac {b \,e^{2} \ln \left (d x +c -1\right )}{6}+\frac {b \,e^{2} \ln \left (d x +c +1\right )}{6}}{d}\) | \(77\) |
risch | \(\frac {e^{2} \left (d x +c \right )^{3} b \ln \left (d x +c +1\right )}{6 d}-\frac {e^{2} d^{2} b \,x^{3} \ln \left (-d x -c +1\right )}{6}-\frac {e^{2} d b c \,x^{2} \ln \left (-d x -c +1\right )}{2}+\frac {e^{2} a \,d^{2} x^{3}}{3}-\frac {e^{2} b \,c^{2} x \ln \left (-d x -c +1\right )}{2}+e^{2} d a c \,x^{2}-\frac {e^{2} b \,c^{3} \ln \left (-d x -c +1\right )}{6 d}+e^{2} a \,c^{2} x +\frac {e^{2} d b \,x^{2}}{6}+\frac {e^{2} b c x}{3}+\frac {b \,e^{2} \ln \left (d^{2} x^{2}+2 c d x +c^{2}-1\right )}{6 d}\) | \(186\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 219 vs.
\(2 (60) = 120\).
time = 0.26, size = 219, normalized size = 3.17 \begin {gather*} \frac {1}{3} \, a d^{2} x^{3} e^{2} + a c d x^{2} e^{2} + \frac {1}{2} \, {\left (2 \, x^{2} \operatorname {artanh}\left (d x + c\right ) + d {\left (\frac {2 \, x}{d^{2}} - \frac {{\left (c^{2} + 2 \, c + 1\right )} \log \left (d x + c + 1\right )}{d^{3}} + \frac {{\left (c^{2} - 2 \, c + 1\right )} \log \left (d x + c - 1\right )}{d^{3}}\right )}\right )} b c d e^{2} + \frac {1}{6} \, {\left (2 \, x^{3} \operatorname {artanh}\left (d x + c\right ) + d {\left (\frac {d x^{2} - 4 \, c x}{d^{3}} + \frac {{\left (c^{3} + 3 \, c^{2} + 3 \, c + 1\right )} \log \left (d x + c + 1\right )}{d^{4}} - \frac {{\left (c^{3} - 3 \, c^{2} + 3 \, c - 1\right )} \log \left (d x + c - 1\right )}{d^{4}}\right )}\right )} b d^{2} e^{2} + a c^{2} x e^{2} + \frac {{\left (2 \, {\left (d x + c\right )} \operatorname {artanh}\left (d x + c\right ) + \log \left (-{\left (d x + c\right )}^{2} + 1\right )\right )} b c^{2} e^{2}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 348 vs.
\(2 (60) = 120\).
time = 0.39, size = 348, normalized size = 5.04 \begin {gather*} \frac {{\left (2 \, a d^{3} x^{3} + {\left (6 \, a c + b\right )} d^{2} x^{2} + 2 \, {\left (3 \, a c^{2} + b c\right )} d x\right )} \cosh \left (1\right )^{2} + 2 \, {\left (2 \, a d^{3} x^{3} + {\left (6 \, a c + b\right )} d^{2} x^{2} + 2 \, {\left (3 \, a c^{2} + b c\right )} d x\right )} \cosh \left (1\right ) \sinh \left (1\right ) + {\left (2 \, a d^{3} x^{3} + {\left (6 \, a c + b\right )} d^{2} x^{2} + 2 \, {\left (3 \, a c^{2} + b c\right )} d x\right )} \sinh \left (1\right )^{2} + {\left ({\left (b c^{3} + b\right )} \cosh \left (1\right )^{2} + 2 \, {\left (b c^{3} + b\right )} \cosh \left (1\right ) \sinh \left (1\right ) + {\left (b c^{3} + b\right )} \sinh \left (1\right )^{2}\right )} \log \left (d x + c + 1\right ) - {\left ({\left (b c^{3} - b\right )} \cosh \left (1\right )^{2} + 2 \, {\left (b c^{3} - b\right )} \cosh \left (1\right ) \sinh \left (1\right ) + {\left (b c^{3} - b\right )} \sinh \left (1\right )^{2}\right )} \log \left (d x + c - 1\right ) + {\left ({\left (b d^{3} x^{3} + 3 \, b c d^{2} x^{2} + 3 \, b c^{2} d x\right )} \cosh \left (1\right )^{2} + 2 \, {\left (b d^{3} x^{3} + 3 \, b c d^{2} x^{2} + 3 \, b c^{2} d x\right )} \cosh \left (1\right ) \sinh \left (1\right ) + {\left (b d^{3} x^{3} + 3 \, b c d^{2} x^{2} + 3 \, b c^{2} d x\right )} \sinh \left (1\right )^{2}\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 180 vs.
\(2 (56) = 112\).
time = 1.07, size = 180, normalized size = 2.61 \begin {gather*} \begin {cases} a c^{2} e^{2} x + a c d e^{2} x^{2} + \frac {a d^{2} e^{2} x^{3}}{3} + \frac {b c^{3} e^{2} \operatorname {atanh}{\left (c + d x \right )}}{3 d} + b c^{2} e^{2} x \operatorname {atanh}{\left (c + d x \right )} + b c d e^{2} x^{2} \operatorname {atanh}{\left (c + d x \right )} + \frac {b c e^{2} x}{3} + \frac {b d^{2} e^{2} x^{3} \operatorname {atanh}{\left (c + d x \right )}}{3} + \frac {b d e^{2} x^{2}}{6} + \frac {b e^{2} \log {\left (\frac {c}{d} + x + \frac {1}{d} \right )}}{3 d} - \frac {b e^{2} \operatorname {atanh}{\left (c + d x \right )}}{3 d} & \text {for}\: d \neq 0 \\c^{2} e^{2} x \left (a + b \operatorname {atanh}{\left (c \right )}\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 322 vs.
\(2 (63) = 126\).
time = 0.44, size = 322, normalized size = 4.67 \begin {gather*} -\frac {1}{6} \, {\left ({\left (c + 1\right )} d - {\left (c - 1\right )} d\right )} {\left (\frac {b e^{2} \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right )}{d^{2}} - \frac {b e^{2} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{d^{2}} - \frac {{\left (\frac {3 \, {\left (d x + c + 1\right )}^{2} b e^{2}}{{\left (d x + c - 1\right )}^{2}} + b e^{2}\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{\frac {{\left (d x + c + 1\right )}^{3} d^{2}}{{\left (d x + c - 1\right )}^{3}} - \frac {3 \, {\left (d x + c + 1\right )}^{2} d^{2}}{{\left (d x + c - 1\right )}^{2}} + \frac {3 \, {\left (d x + c + 1\right )} d^{2}}{d x + c - 1} - d^{2}} - \frac {2 \, {\left (\frac {3 \, {\left (d x + c + 1\right )}^{2} a e^{2}}{{\left (d x + c - 1\right )}^{2}} + a e^{2} + \frac {{\left (d x + c + 1\right )}^{2} b e^{2}}{{\left (d x + c - 1\right )}^{2}} - \frac {{\left (d x + c + 1\right )} b e^{2}}{d x + c - 1}\right )}}{\frac {{\left (d x + c + 1\right )}^{3} d^{2}}{{\left (d x + c - 1\right )}^{3}} - \frac {3 \, {\left (d x + c + 1\right )}^{2} d^{2}}{{\left (d x + c - 1\right )}^{2}} + \frac {3 \, {\left (d x + c + 1\right )} d^{2}}{d x + c - 1} - d^{2}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.62, size = 237, normalized size = 3.43 \begin {gather*} \frac {a\,d^2\,e^2\,x^3}{3}+\frac {b\,c\,e^2\,x}{3}+\frac {b\,e^2\,\ln \left (c+d\,x-1\right )}{6\,d}+\frac {b\,e^2\,\ln \left (c+d\,x+1\right )}{6\,d}+a\,c^2\,e^2\,x+\frac {b\,d\,e^2\,x^2}{6}+a\,c\,d\,e^2\,x^2+\frac {b\,c^2\,e^2\,x\,\ln \left (c+d\,x+1\right )}{2}-\frac {b\,c^3\,e^2\,\ln \left (c+d\,x-1\right )}{6\,d}+\frac {b\,c^3\,e^2\,\ln \left (c+d\,x+1\right )}{6\,d}-\frac {b\,c^2\,e^2\,x\,\ln \left (1-d\,x-c\right )}{2}+\frac {b\,d^2\,e^2\,x^3\,\ln \left (c+d\,x+1\right )}{6}-\frac {b\,d^2\,e^2\,x^3\,\ln \left (1-d\,x-c\right )}{6}+\frac {b\,c\,d\,e^2\,x^2\,\ln \left (c+d\,x+1\right )}{2}-\frac {b\,c\,d\,e^2\,x^2\,\ln \left (1-d\,x-c\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________